// @ts-ignore
/* eslint-disable */
import { api } from "@/utils/api";

/** 新增设备-定期检修计划数据 POST /equRepairRegularPlan/add */
export async function equRepairRegularPlanAdd(
  body: BIZAPI.EquRepairRegularPlanCreateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function equRepairRegularPlanAdd(
  body: BIZAPI.EquRepairRegularPlanCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function equRepairRegularPlanAdd(
  body: BIZAPI.EquRepairRegularPlanCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function equRepairRegularPlanAdd(
  body: BIZAPI.EquRepairRegularPlanCreateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/equRepairRegularPlan/add`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultObject>(`/app/equRepairRegularPlan/add`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除设备-定期检修计划数据 POST /equRepairRegularPlan/delete */
export async function equRepairRegularPlanDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function equRepairRegularPlanDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function equRepairRegularPlanDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function equRepairRegularPlanDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/equRepairRegularPlan/delete`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultObject>(`/app/equRepairRegularPlan/delete`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取设备-定期检修计划数据 POST /equRepairRegularPlan/get */
export async function equRepairRegularPlanGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultEquRepairRegularPlanEntity>;

export async function equRepairRegularPlanGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultEquRepairRegularPlanEntity>>;

export async function equRepairRegularPlanGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultEquRepairRegularPlanEntity>;

export async function equRepairRegularPlanGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultEquRepairRegularPlanEntity>(
      `/app/equRepairRegularPlan/get`,
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
        tupleResponse: true,
      }
    );
  }

  return api<BIZAPI.IResultEquRepairRegularPlanEntity>(
    `/app/equRepairRegularPlan/get`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 获取设备-定期检修计划分页数据 POST /equRepairRegularPlan/page */
export async function equRepairRegularPlanPage(
  body: BIZAPI.EquRepairRegularPlanQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageEquRepairRegularPlanEntity>;

export async function equRepairRegularPlanPage(
  body: BIZAPI.EquRepairRegularPlanQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageEquRepairRegularPlanEntity>>;

export async function equRepairRegularPlanPage(
  body: BIZAPI.EquRepairRegularPlanQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageEquRepairRegularPlanEntity>;

export async function equRepairRegularPlanPage(
  body: BIZAPI.EquRepairRegularPlanQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageEquRepairRegularPlanEntity>(
      `/app/equRepairRegularPlan/page`,
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
        tupleResponse: true,
      }
    );
  }

  return api<BIZAPI.IResultIPageEquRepairRegularPlanEntity>(
    `/app/equRepairRegularPlan/page`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 更新设备-定期检修计划数据 POST /equRepairRegularPlan/update */
export async function equRepairRegularPlanUpdate(
  body: BIZAPI.EquRepairRegularPlanUpdateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function equRepairRegularPlanUpdate(
  body: BIZAPI.EquRepairRegularPlanUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function equRepairRegularPlanUpdate(
  body: BIZAPI.EquRepairRegularPlanUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function equRepairRegularPlanUpdate(
  body: BIZAPI.EquRepairRegularPlanUpdateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/equRepairRegularPlan/update`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultObject>(`/app/equRepairRegularPlan/update`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
